Coupled Algorithms on Quadrilateral Grids for Generalized Axi-Symmetric Viscoelastic Fluid Flows

ABSTRACT

The present invention is directed towards systems and methods for simulating and analyzing viscoelastic fluid flow. The fluid flows through a channel and is ejected from a channel. The fluid has an interface between a first fluid and a second fluid. The method includes performing finite difference analysis and using a level set projection method to solve equations governing the viscoelastic flow of the fluids through the channel. The equations governing the viscoelastic flow include an azimuthal velocity term that is an approximate description of the azimuthal flow of the fluid. The equations governing the viscoelastic flow also include an approximation of the stress experienced by the fluids being simulated. The equations governing the viscoelastic flow include an advection term that includes an azimuthal velocity term. The finite difference analysis used to solve the governing equations includes a second-order Godunov type upwind scheme to update the advection terms over time. The level set for the first and second fluids is updated periodically during the simulation.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation-in-part of prior U.S. patent application Ser. No. 11/205,441 (AP258HO), filed Aug. 17, 2005 and is hereby incorporated by reference in its entirety.

U.S. Pat. No. 7,117,138 (AP161TP) issued on Oct. 3, 2006, and U.S. Pat. No. 7,085,695 (AP125TP) issued on Aug. 1, 2006 are hereby incorporated by reference in their entirety. U.S. Provisional Patent Application Nos. 60/684,763 (AP260PRHO), filed on May 25, 2005 and 60/680,747 (AP258PRHO), filed on May 13, 2005 are hereby incorporated by reference in their entirety.

FIELD OF THE INVENTION

The present invention relates to finite difference algorithms and associated models for simulating the ejection of viscoelastic ink. The algorithms may be embodied in software, hardware, or combination thereof and may be implemented on a computer or other processor-controlled device.

DESCRIPTION OF THE RELATED ART

Results of ink-jet simulation are useful in the design of ink-jet print heads. Ink-jet simulations may be carried out using analytical tools such as equivalent circuits that receive as input, the dynamic voltage to be applied to a piezoelectric actuator and simulates the ink behavior under the influence of the ink cartridge, supply channel, vibration plate, and actuator. The equivalent circuit can calculate input variables, which may be used inputs for computational fluid dynamics (CFD) code. The CFD code then solves the governing partial differential equations, i.e., the incompressible Navier-Stokes equations for two-phase flows, for fluid velocity, pressure and interface position, and feeds back the ink flow rate to the equivalent circuit. The sequence is repeated as long as needed.

The dynamics of fluid flow through the ink nozzle, coupled to surface tension effects along the ink-air interface and boundary conditions along the wall, act to determine the shape of the interface as it moves. Designing the CFD code largely involves taking into account the dynamically changing ink-air interface, which is quite challenging.

One method that has been used to model the ink-air interface is the volume of fluid method (VOF). The VOF method performs fairly well with regard to mass conversation but has problems accurately describing the surface tension aspects of fluid flow, especially when the ink droplet is smaller than 5 picoliters. Considering that the capability of ejecting ultra small ink droplets is essential for any photo quality ink-jet printer today, VOF methods have given way to improved modeling methods including the level set method, which can be more accurate at capturing the ink-air interface in CFD simulations. There is a mathematical relationship between the level set and the curvature of the interface that the level set describes. There is also a relationship between the surface tension of the interface and the curvature of the interface. Thus, the level set method can be very effective at describing the surface tension of the interface.

One way of solving the level set equations is by using finite element analysis. However, this method may result in mass conservation problems. Instead, the present invention proposes using finite difference analysis to solve the level set equations.

Prior art methods did not take into account the rotation of the fluid, i.e. the azimuthal velocity of the fluid. The present invention is directed towards methods of simulating a viscoelastic fluid that takes into account the azimuthal velocity of a fluid.

The present invention continues along this technological path of using finite difference analysis in ink ejection simulation. In so doing, the present invention provides substantial improvements in finite difference algorithms performed on rectangular grids for viscoelastic ink ejection simulations.

SUMMARY OF THE INVENTION

The present invention is directed towards systems and methods for simulating and analyzing viscoelastic fluid flow. The fluid flows through a channel and is ejected from a channel. The fluid has an interface between a first fluid and a second fluid. The method includes performing finite difference analysis and using a level set projection method to solve equations governing the viscoelastic flow of the fluids through the channel.

The equations governing the viscoelastic flow include an azimuthal velocity term that is an approximate description of the azimuthal flow of the fluid. The equations governing the viscoelastic flow also include an approximation of the stress experienced by the fluids being simulated. The equations governing the viscoelastic flow include an advection term that includes an azimuthal velocity term.

The finite difference analysis used to solve the governing equations includes a second-order Godunov type upwind scheme to update the advection terms over time. The level set for the first and second fluids is updated periodically during the simulation.

The equations governing the viscoelastic flow of the fluid includes a horizontal orthogonal planar velocity vector that that is orthogonal to a horizontal component of a fluid velocity vector that describes the velocity of the fluid. The vertical component of the horizontal velocity vector is substantially zero.

The fluid velocity vector and the horizontal velocity vector are described with reference to an axially symmetric coordinate system. The radial component of the horizontal velocity vector is equal to the negative of an azimuthal component of the fluid velocity vector. An azimuthal component of the horizontal velocity vector is equal to a radial component of the fluid velocity vector.

The finite difference analysis and the level set projection method are used to solve equations governing the fluid flow of a first and second fluid.

The fluid flow of the second fluid is viscoelastic.

A computer readable medium encoded with instructions which a computer can interpret to perform the present invention.

A system including logic elements for performing the present invention.

The equations governing the viscoelastic flow include a partial differential of a stress tensor along an azimuthal axis. The partial differential of the stress tensor is defined as $\frac{\partial\tau}{\partial\theta} = {\begin{pmatrix} {{- 2}\tau_{r\quad\theta}} & {\tau_{rr} - \tau_{\theta\theta}} & {- \tau_{\theta\quad z}} \\ {\tau_{rr} - \tau_{\theta\theta}} & {2\tau_{r\quad\theta}} & \tau_{rz} \\ {- \tau_{\theta\quad z}} & \tau_{rz} & 0 \end{pmatrix}.}$

Other objects and attainments together with a fuller understanding of the invention will become apparent and appreciated by referring to the following description and claims taken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings wherein like reference symbols refer to like parts.

FIG. 1 is a symbolic illustration of a simple Maxwell's viscoelastic model;

FIG. 2 is an illustration of a system which an embodiment of the present invention may be used to simulate;

FIG. 3 is a quadrilateral body-fitted grid which may be used in an embodiment of the present invention;

FIG. 4 is an illustration of an exemplarily mapping of a square grid to a body-fitted grid which may be used in an embodiment of the present invention;

FIG. 5 is an illustration of a square computational grid which may be used in an embodiment of the present invention;

FIGS. 6A-6B are illustrations of an axially symmetric coordinate system, a Cartesian coordinate system, a velocity vector {right arrow over (u)} and a velocity vector {right arrow over (u)}_(⊥) that is orthogonal to the horizontal component of the velocity vector {right arrow over (u)};

FIGS. 7A-7B are illustrations of a computational grid and the location of variables being simulated;

FIGS. 8A-8B are illustrations of the interface of a rotating Newtonian fluid and a rotating viscoelastic fluid; and

FIG. 9 is a schematic diagram of an exemplary system that may be used to implement embodiments of the invention.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention is directed towards a method for numerically simulating viscoelastic fluid flow phenomena. Inks used in industrial printing applications may be viscoelastic, i.e. the relation between the stress tensor and the rate of deformation tensor at any particular instant depends on the deformation history.

FIG. 1 is an illustration of a simple Maxwell's viscoelastic model 100, which includes a dashpot 102 and a spring 104. In this model 100: τ is the stress; s is the rate of deformation; μ is the dynamic viscosity; and G is the elastic constant. Assuming both the spring 104 and the dashpot 102 in the model 100 are linear, we have equation (1) which is set forth in the Appendix along with the other numbered equations referenced in the following discussion.

Equation (1) is a differential equation which describes the stress τ at any given instant in time as depending upon on both the rate of deformation s and the temporal derivate of the stress τ. The term G/μ is related to the relaxation time of the model 100 and is a defining characteristic of the model 100. The longer the relaxation time the more the viscoelastic fluid behaves differently from an ideal Newtonian fluid. The mechanical model for a Newtonian fluid is similar to Maxwell model 100 except that Newtonian model only has a dashpot 102 and no spring 104. The constitutive relation for Newtonian fluid is shown in equation (2), wherein the stress τ is a linear function of the rate of deformation s.

The fluid model considered in this work is based on the Maxwell type viscoelastic model 100. For simplicity of presentation, we consider a linear Maxwell model, wherein both the dynamic viscosity μ and the elastic constant G are constant. An embodiment of the present invention as described herein is in the context of continuum mechanics and includes aspects of the Oldroyd-B model.

An embodiment of the present invention is directed towards simulating a system 200 as illustrated in FIG. 2, which is described by two phase immiscible incompressible fluid flow in the presence of surface tension. The system 200 includes a density jump across the interface 202 separating ink 204 (the viscoelastic fluid) and air 206 (the Newtonian fluid).

Incorporated within the system may be a macroscopic slipping contact line model, which describes the dynamics of a second interface 208 between the air 206, the ink 204, and a wall 210. The fluid interface 202 between the air 206 and the ink 204 may be treated as an infinitely thin immiscible boundary, separating regions of differing but constant densities and viscosities. For boundary conditions on the walls 210 we assume that both the normal and tangential components of the fluid velocity vanishes, except at the second interface 208 where the slipping contact model may be used to describe the boundary conditions.

Equations of Motion

The ink 204 i.e., the first fluid, is a viscoelastic fluid. An embodiment of the present invention may use the Oldroyd-B viscoelastic fluid model to represent the first fluid. In accordance with Oldroyd-B viscoelastic fluid model, the first fluid is governed by equations (3). The air 206 i.e., the second fluid is governed by the incompressible Navier-Stokes equations i.e., equation (4). Some of the terms found in equations (3) and (4) are described in equation (5). Equation (6) is the Lagrangian time derivative.

The definition of the terms used in equations (3)-(6) are: D_(i) is the rate of deformation tensor for fluid i; {right arrow over (u)}_(i)(r,z) is the velocity of fluid i; p_(i)≡p_(i)(r,z) is the pressure of fluid i; τ₁≡τ₁(r,z) is the viscoelastic stress tensor of the first fluid; ρ_(i) is the density of fluid i; μ_(i) is the dynamic viscosity of fluid i; λ₁ is the viscoelastic relaxation time of fluid 1; and μ_(p1) is the solute dynamic viscosity of fluid 1. The subscript i=1, 2 is used to denote which fluid the particular variable or constant is associated with, 1 being the first fluid or the ink 204 and 2 being the second fluid or the air 206.

In the present embodiment, the second fluid 206 is assumed to be air, which behaves like a Newtonian fluid. Thus, the viscoelastic stress tensor τ₂ vanishes for the second fluid 206. The dynamic viscosity μ₁ of the ink is the dynamic viscosity of the ink solvent, which is typically water. Equation (7) list three of the terms from equation (3) which taken together constitute the upper convected time derivative (i.e., Oldroyd derivative) of the viscoelastic stress tensor τ₁. The terms in equation (7) are used in the Oldroyd-B model to guarantee the material frame indifference. Equation (7) may also be thought of as the Lagrangian time derivative of the Kirchoff-Piola stress tensor of the second kind.

Since the size of the typical ink jet print head is small as is the mass of the liquid being simulated the gravity term tends to be inconsequential, and is omitted in this embodiment of the present invention. An individual skilled in the art would appreciate that the inclusion of the gravity term would not significantly alter the method described herein and recited in the claims.

It should also be appreciated that the methods described herein will work equally well when both fluids are viscoelastic. The present invention is directed towards a method of simulating a fluid in which the effect of the azimuthal velocity component v(r,z)ê_(θ) is taken into account, which had not been taken into account in prior art methods. In the present embodiment the velocity components, pressure, and elements of the viscoelastic stress tensor are dependent upon the spatial variables r and z.

The boundary conditions at the interface 202 of the first fluid 204 and the second fluid 206 are the continuity of the velocity ({right arrow over (u)}₁={right arrow over (u)}₂) and the jump condition as described by equation (8). In equation (8) {circumflex over (n)} is the unit normal to the interface 202 drawn from the second fluid 206 to the first fluid 204; κ is the curvature of the interface 202 and σ is the coefficient of surface tension of the interface 202.

A level set function φ, which is a signed distance function, is defined in an n dimensional space relative to a zero level set function Γ, which defines a n−1 surface in the n dimensional space. The absolute value of the level set function |φ| at a point in the n dimensional space is equal to the absolute value of the distance of the shortest vector from the point to the zero level set function Γ. The zero level set function Γ separates the computational space into a first region and a second region. The level set function φ is positive in the first region and negative in the second region. The first and second regions may or may not be contiguous. The level set function φ is defined as zero at the surface Γ thus giving its name to the zero level set function.

In the context of the present invention, the zero level set function Γ is analogous to the interface 202. The first region is analogous to the region of space occupied by the first fluid 204 and the second region is analogous to the region of space occupied by the second fluid 206. The level set function may be defined in the space occupied by the first fluid 204 and the second fluid 206.

In the present invention the level set method is used to trace the interface 202. The unit normal {circumflex over (n)} on the interface 202 can be expressed in terms of the level set function φ as shown in equation (9). Likewise the curvature κ may be defined as the divergence of the unit normal vector {circumflex over (n)} which applied to equation (9) gives us equation (10) which defines the curvature κ in terms of the level set function φ.

For the sake convenience, subscripts are dropped where possible. Thus, for φ>0: u=u₁; τ=τ₁; p=p₁; and D=D₁, and for φ<0: u=u₂; τ=0; p=p₂; ρ=ρ₂; μ=μ₂; λ=0; μ_(p)=0 and D=D₂. In addition for φ≧0: ρ=ρ₁, μ=μ₁, μ=μ₁, and μ_(p)=μ_(p1). The governing equations for the two-phase flow and the boundary condition at the interface can then be re-written in the slightly simplified form as shown in equation (11)-(13) in which δ is the Dirac delta function.

By choosing the definitions listed in equations (14) it is possible to make the governing equations dimensionless. Wherein the primed quantities are dimensionless and L is the characteristic length, U is the characteristic velocity, ρ₁ is the density of the first fluid 204, λ is the relaxation time and μ₁ is the dynamic viscosity of the solvent in the first fluid 204. Substituting the definitions from equations (14) into equations (11)-(13), and dropping the primes, a new set of dimensionless governing equations is listed as equations (15)-(17). The coefficients such as: density ratio (ρ); viscosity ratio (μ); normalized relaxation time (λ); Reynolds number of the solvent (Re); Weber number (We); and Reynolds number of the solute (Re_(p)) as used in equations (16) and (17) are defined in equations (18) and (19).

The interface 202 moves with the first fluid 204 and the second fluid 206. The evolution of the level set function φ is governed by an evolution equation (20).

Boundary Conditions and Contact Models

An embodiment of the present invention may simulate systems in which some of the boundaries are solid walls 210. In an embodiment of the present invention, it may be assumed that at the solid walls both the normal and tangential components of the velocity are substantially zero. An exception may be made at the second interface 208 at which the solid wall 210 meets both the first fluid 204 and the second fluid 206.

In an embodiment of the present invention, the boundary conditions may include inflow and outflow of one or both of the first fluid and the second fluid. The inflow and outflow of the fluid may be defined in terms of the velocity as in equation (21) or in terms of the pressure as shown in equation (22). Wherein {circumflex over (n)} denotes the unit normal to the inflow or outflow boundary. Boundary conditions for the viscoelastic stresses, may be implemented using an extrapolation of the viscoelastic stresses (τ).

An embodiment of the present invention may adopt the slipping contact model, as disclosed in U.S. Pat. No. 7,085,695 (AP125TP), for the second interface 208 where the wall 210 meets both the first fluid 204 and the second fluid 206.

Governing Equations on Quadrilateral Mesh

An embodiment of the present invention may be used to simulate a system with reasonably complex geometries as shown in FIG. 3, for which a rectangular grid may not work well. Thus, there is a need for a general quadrilateral grid formulation. FIG. 3 is an illustration of a body fitted quadrilateral grid mesh 300 that has been fitted to the geometry of an ink jet nozzle 200. An embodiment of the present invention my include transforming the viscosity, surface tension, and viscoelastic stress terms from a quadrilateral mesh 300 to a rectangular mesh 400.

A physical axi-symmetric space X=(r,θ,z) may contain a body-fitted quadrilateral mesh 300 such as the one illustrated in FIG. 3. As stated in equation (23) there may exist a transformation Φ which maps the grid points of the axially symmetric rectangular mesh in the computational space Ξ=(ξ,θ,η) (400) to those of a quadrilateral mesh in a physical axi-symmetric space X (300) as illustrated in FIG. 4. Two things are needed in order to define the transformation Φ: the Jacobian, which represents the volume change when a rectangular cell in the computational space is transformed to a quadrilateral cell; and the transformation matrix, which represents the cell distortion in the transformation. Equation (24) is the Jacobian for transformation Φ. While equation (25) is a transformation matrix for the transformation Φ. The coefficient g as used in equations (24) and (25) is defined as g=2πr for axi-symmetric coordinate systems. For the convenience of future discussion, we also define the transformed convection velocity and transformed viscoelastic stress tensor in equations (26). The transformed convection velocity is also the flux of the fluid.

The pressure gradient found in the first term of equation (16) may be obtained by first calculating the pressure gradient in the computational space Ξ. The pressure gradient in the computational space Ξ may than be transformed into the pressure gradient in the physical space X in the manner shown in equation (27). An individual skilled in the art would appreciate that equation (27) may be easily derived based on the chain rule. The divergence free continuity condition from equation (15) may be shown to be equation (28) when formulated in the computational space Ξ. A proof of this may be found by expanding equation (28) in the manner shown in equation (29) in which equation (25) has been substituted into equation (28).

An individual skilled in the art would appreciate that by combining the transformations in (27) and (29), we can easily obtain the convection term as shown in equation (30) in which {right arrow over (u)}_(⊥)=(−vu0)^(T). In the following discussion, the vector {right arrow over (u)}_(⊥) is referred to as the orthogonal horizontal velocity vector. It is noted that {right arrow over (u)}_(⊥) is always orthogonal to {right arrow over (u)} because {right arrow over (u)}·{right arrow over (u)}_(⊥)=0. FIGS. 6A-6B are illustrations of the velocity vector {right arrow over (u)} in both a Cartesian coordinate system and an axially symmetric coordinate system. FIGS. 6A-6B also show the orthogonal horizontal velocity vector {right arrow over (u)}_(⊥). The convection term in the level set evolution equation (20) may be transformed in the manner shown in equation (31). FIG. 6B is a graphical illustration of the vector {right arrow over (u)}_(⊥) and it's relationship to the vector {right arrow over (u)}.

Equation (32) is an expansion of the viscosity term found in equation (16) for two-phase flow. An individual skilled in the art would appreciate that equation (33) is true for any differentiable velocity field {right arrow over (u)}. Based on equation (33) the last term of the viscosity term as presented in equation (32) may be dropped. Equation (34) is the viscosity term described mostly in the computational space Ξ with the last term dropped in accordance with equation (33). The last term of equation (34) is not described in the computational space, but is described below. The matrix I₀ as used in equation (34) is defined in equation (35). Please note that the 2u/rê_(θ)ê_(θ) term has been omitted from the second half of the dot product listed in equation (34). This may be done because the lack of an azimuthal component ê_(θ) in the first half of the dot product makes the contribution due to of 2u/rê_(θ)ê_(θ) zero.

Equation (34) includes a spatial derivative of the viscosity. For systems in which the viscosity is constant such as single phase flow this term vanishes. However, it plays an important role for two phase flow system such as those used by an embodiment of the present invention.

Equation (36) is a useful formulation of the vector Laplacian operator when applied to the fluid velocity vector {right arrow over (u)} in an axi-symmetric coordinate system. Equation (37) describes the transformation of the matrix in equation (36) from the physical space X to the computational space Ξ. Equation (38) shows how the divergence in equation (36) may be transformed. Equations (37) and (38) may be used to complete the transformation of equation (36) to give us equation (39). By combining equations (34) and (39) we get the viscosity term (32) in the computational space giving us equation (40).

Curvature and Surface Tension

An embodiment of the present invention may define the level set function as being function of the radial and axial coordinates and independent of the azimuthal coordinates, φ≡φ(r,z). It is seen that the derivate of the level set function relative to the azimuth is zero, ∂φ/∂θ=0. The curvature κ of the interface 202 may be defined solely in terms of the level set function as shown in equation (10). Equations (27) and (28) may be used to transform equation (10) into equation (41) as a formulation of the curvature κ in the computational space.

The surface tension term, which is the third term in equation (16) may be transformed into computational space as shown in equation (42) using equation (41).

Divergence of Viscoelastic Stress Tensor

The viscoelastic stress tensor τ is a 3×3 matrix that is representative of the viscoelastic stress experienced by the fluids. Equation (43) is representative of the divergence of the stress tensor τ and its representation in the computational space Ξ.

Upper-Convected Derivative Terms

The convection term in the upper-convected derivative is formulated in the computational space Ξ as shown in equation (44) in which the last matrix term is defined in equation (45). The convection term of the upper-convected derivate is proportional to the directional derivative of the stress tensor along the direction of the fluid velocity. As shown in equation (44) the convection term may be divided into two parts. The first part describes how the stress tensor τ changes in the radial and axial directions of the computational space Ξ. Please note that the gradient in the computational space Ξ as used in equation (44) does not include the azimuthal component. The second part of the convection term is proportional to the partial derivative of the stress tensor relative to the azimuth. The second part of the convection term is also proportional to the velocity of the fluid and inversely proportional the radius.

The partial derivative of the stress tensor τ along the azimuth θ is defined as the tensor τ_(V) and is described in equation (45). An analytical solution to the partial derivate of stress in a fluid simulation is generally not known. It is typically necessary to calculate this partial derivate numerically by doing an expansion in the computational space. The inventor has found that a means for calculating τ_(V), which is described in equation (45), that does not include an expansion in the computational space.

The second term of the upper-convected derivate is defined in equation (46) in the computational space Ξ, in which matrix terms used in equation (46) are defined in equation (47).

Combining equations (29) to (47), we obtain the governing equations (48) and (51) on the quadrilateral grid Ξ. The viscosity term as used in equation (48) is defined in equation (40).

Equations (27) to (51) are derived for the quadrilateral grid in a generalized axi-symmetric coordinate system. The embodiment of the present invention described above does not include the effect of gravity. An individual skilled in the art would appreciate that adding the effect of gravity would substantially change the present invention as recited in the claims.

Numerical Algorithms Temporal Discretization

In the equations described below the superscript n (or n+1) is used to denote the time step, an example of which is described in equation (52). Given the quantities {right arrow over (u)}^(n), p^(n−1/2), φ^(n), and τ^(n) the purpose is to obtain {right arrow over (u)}^(n+1), p^(n+1/2), φ^(n+1), and τ^(n+1). The semi-implicit algorithm described below is second-order accurate in both time and space.

The boundary condition on the nozzle wall may be based on a contact model. The inflow pressure p of one or both fluids at a time t^(n+1) may be given by an equivalent circuit. The temporal discretization is independent of the coordinate system or grids being used. The governing equations in vector notation (i.e. (15), (16), (17), and (20)) will be used below to explain temporal discretization. Evaluating individual terms on quadrilateral grids will be explained later.

Level Set Update

The level set φ is updated using the time discretized equation shown in equation (53). Equation (53) includes a time-centered advection term [{right arrow over (u)}·∇φ]^(n+1/2), which may be evaluated using an explicit predictor-corrector scheme that requires only data available at a time t^(n). Once the level set φ at a time step n+1 is obtained (φ^(n+1)), the level set φ at a half time step (φ^(n+1/2)) is computed by using an update rule in equation (54) based on a temporal average.

Semi-Implicit Time Integration for Momentum Equations

For a semi-implicit temporal scheme, we first calculate an intermediated velocity of the fluid {right arrow over (u)}** as shown in equation (55) which may be derived from equation (16). It is useful to define a velocity predictor {right arrow over (u)}* as shown in equation (56). The term D* as used in equation (56) is defined in equation (57). After the intermediate velocity {right arrow over (u)}** is calculated using (55), {right arrow over (u)}* can be obtained by inverting the equation (56).

As described in equation (58) the velocity predictor is then adjusted by adding a term proportional to the pressure gradient. Finally the projection equation (59) is solved by enforcing the incompressibility condition of equation (15) at time t^(n+1).

A second-order explicit Godunov method for the advection term in equation (55). The central difference method is used for the viscosity term and the surface tension term in equation (55). The viscoelastic stress term is evaluated at the time t^(n+1). The time-centered cell edge viscoelastic stress terms are obtained by using a Taylor's expansion and Godunov upwinding. The central difference method may then be employed to evaluate the divergence of the viscoelastic stress tensor τ.

Projection for {right arrow over (u)}^(n+1)

By applying the divergence operator to both sides of equation (59) the incompressibility condition of equation (15) may be satisfied at time step n+1. Which gives us equation (60), since ∇·{right arrow over (u)}^(n+1)=0. Once the pressure p^(n+1/2) is calculated from equation (60), then the velocity field {right arrow over (u)}^(n+1) can be obtained by using equation (59).

To simplify the implementation for arbitrary geometries, a finite element projection is used such as the one stated in equation (61). The function ψ is the finite element weighting function. The surface Γ₁ is representative of the boundary in which fluid flows in and out of the simulation space. The function {right arrow over (u)}^(BC) is the velocity of the fluid at the boundary. The space Ω is the volume of space to be simulated. The divergence theorem may be used to show that a boundary condition at the surface Γ₁ is equation (62).

The choice of the weighting function ψ, as well as the approximation for the pressure p and velocity {right arrow over (u)}, is flexible. In an embodiment of the invention, the weighting function ψ and the pressure p are chosen to be piecewise bilinear, and the velocity {right arrow over (u)} is chosen to be piecewise constant.

Mixed Algorithm for the Viscoelastic Stresses

Equation (63) may be used in an algorithm to integrate the viscoelastic stress in time that is: explicit with the advection term; semi-implicit with the viscosity term; and implicit with the relaxation term. In equation (63) the terms {right arrow over (u)}^(n+1/2) and τ^(n+1/2) are the time-centered cell edge velocity and the time centered viscoelastic stress, both of which may be determined by a Taylor's expansion along with Godunov upwinding. A rearrangement of equation (63) gives us equation (64) in which the viscoelastic stress tensor τ at time step n+1 in terms of quantities at time step n and time step n+½.

Re-Initialization of the Level Set Function

The interface Γ between the first fluid and the second fluid is implicitly described by the level set function φ. In order to calculate the surface tension of the interface Γ it is important that the level set function φ remain a signed distance function to the interface Γ as time evolves. However, if we update the level set φ using equation (53), it will not remain as such for long. A preferred embodiment of the present invention periodically stops the simulation and recreates a new level set function φ which is a signed distance function, such that |∇φ|=1, without changing the position of the interface zero level set Γ. Several level set re-initialization algorithms are discussed in the prior art including U.S. Pat. No. 7,254,523, and U.S. patent application Ser. No. 11/398,775, which are hereby incorporated by reference.

Spatial Discretization

The following embodiment of the present invention will be described in terms of generalized axisymmetric viscoelastic fluid flows. Equations (65) define the terms constraints of the simulation. The velocity vector {right arrow over (u)} and the viscoelastic stress tensor τ include azimuthal terms. Prior art methods did not include azimuthal terms.

FIG. 7A is an illustration of a portion of the grid 400 in which the relative locations of various system variables is illustrated. As shown in FIG. 7A, the velocities {right arrow over (u)}_(i,j) ^(n), and the level set φ_(i,j) ^(n) are located at the cell centers. Although not shown in FIG. 7A the viscoelastic stresses τ_(i,j) ^(n) are also located at the cell centers. FIG. 7A also shows that the pressure p_(i,j) ^(n−1/2) is calculated at the grid points. FIG. 7B illustrates the time-centered edge velocities {right arrow over (u)}_(i+1/2,j) ^(n+1/2), and the time-centered level set values φ_(i+1/2,j) ^(n+1/2), which are also referred to as predictors. These predictors are located at the middle point of cell edges as shown in FIG. 7B. Although not illustrated in FIG. 7B the time-centered edge viscoelastic stresses τ_(i+1/2,j) ^(n+1/2) are also located at the middle point of the cell edges.

The Quadrilateral Grid

An embodiment of the present invention makes use of the transformation X=Φ(Ξ), equation (23). This transformation Φ transforms a physical space X to a quadrilateral space Ξ as shown in FIG. 4. In a preferred embodiment of the present invention the grid of the computational space Ξ is composed of unit squares, i.e. the grid in the computational space Ξ has Δξ=Δη=1. The boundary-fitted quadrilateral grid 300 and the nozzle wall in FIG. 3 are mapped to the uniform computational grid 400 and the rectangular hatched area as illustrated in FIG. 5.

Equation (66) exemplifies how the coordinates at the cell centers in the physical space X may be defined, namely as an average of the cell nodes. As used in the following discussion, variables with two subscripts define relative grid points. In an embodiment of the present invention, each node may be associated with two or more coordinates which define a point in the physical space X.

In an embodiment of the present invention, the elements of the transformation matrix T at the cell centers may be defined in terms of the differences of the grid points as shown in equation (67). The transformation does not need to be defined globally. An embodiment of the present invention may use a local definition defined at each cell center.

The Advection Terms in Momentum and Level Set Equations

A method of calculating advection terms in a momentum calculation and a level set calculation may be based on an un-split second order Godunov method. An embodiment of the invention may use a cell-centered predictor corrector scheme. The corrector step in the predictor corrector scheme may evaluate equations (68) and (69).

In equations (68) and (69), the time-centered edge velocities and edge level sets (the predictors) are obtained using a Taylor's expansion. The time derivatives {right arrow over (u)}_(t) ^(n) and φ_(t) ^(n) are substituted by the momentum equations and the level set convection equation. The time centered edge velocity {right arrow over (u)}_(i+1/2,j) ^(n+1/2) is calculated from both sides of the edge. Godunov type upwinding is used to decide which extrapolation to use. The other time-centered edge values can be calculated using a similar method.

Equation (70) is the time centered edge velocity as extrapolated from the left. The term {right arrow over (F)}_(i,j) ^(n) is stated in equation (71). Equation (72) is the time centered edge velocity as extrapolated from the right. In an embodiment of the present invention the normal slopes {right arrow over (u)}_(ξ,i,j) ^(n) may be evaluated using a monotonicity limited central difference method as described in equations (80)-(83) which are described below. The limiting is done on each component of the velocity at t^(n) separately. The transverse derivative term ( w{right arrow over (u)}_(η))_(i,j) ^(n) may be evaluated using an upwind scheme.

As stated above Godunov upwinding is used to decide which extrapolation to use. The transformed edge velocity is calculated using a natural extension of equation (25), {right arrow over (u)} _(i+1/2,j) ^(n+1/2)=(gT{right arrow over (u)})_(i+1/2,j) ^(n+1/2). The decision process for choosing between the right and left transformed edge velocities is described in equation (73).

The transformed edge velocities may not be divergence-free. An intermediate marker and cell (MAC) projection may be used to make the normal edge velocities divergence-free. Given a relatively smooth function q, and the edge velocities {right arrow over (u)}^(e) obtained using equations (70)-(73) we can create an equation (75) that is divergence free. By taking the divergence of equation (75) we get equation (76). On quadrilateral grids, the MAC projection in equation (76) is given in equation (77). The boundary conditions for q as used in equation (77) are similar to those for the pressure p. At the outflow of the simulation q may be defined as zero, q=0. At the inflow, we may define equation q as in equation (78). After a solution to q has been found the edge velocity may be transformed using equation (79). Thus the function q is used to reduce the divergence of the velocity. The normal component of the transformed edge velocities is then employed to decide the time centered edge centered velocities and level set values as in equation (74).

Evaluation of the Normal Derivatives

The normal derivatives ({right arrow over (u)} _(ξ) )_(i,j) ^(n) in equations (70) and (72) are evaluated using a monotonicity-limited central difference method for each term in the vector. Monotonicity-limited central difference methods as used in a preferred embodiment of the present invention limits the rate that the slope changes. In the following equation the superscript ^(n) is omitted so as to simplify the equations. The central difference D^(c), the forward difference D⁺, and the backward difference D⁻ are first calculated as shown in equation (80). These differences are used to define the limited slope δ_(lim) as shown in equation (81). The vector terms of the normal derivate are calculated in the manner shown from second-order limited slope as shown in equation (81).

Evaluation of the Tangential Derivatives

In an embodiment of the present invention the tangential derivate ( w{right arrow over (u)}_(η))_(i,j) ^(n) as used in equations (70) and (72) is calculated using an upwind scheme such as the one described in equation (83). Using an upwind scheme to calculate the tangential derivate improves the stability of the algorithm.

Evaluation of the Last Term in Equation (67)

An embodiment of the present invention may evaluate the last term of equation (68) by averaging the time-centered edge velocities as shown in equation (84).

The Viscosity Term

We need to discretize the viscosity term in (71), the form of which in the computational space is defined in (40). The discretization of the first part of the viscosity term (40) is done by central differencing for all the derivatives and by simple averaging for the last term. The Laplacian in the computational space may be calculated using equation (85) in which the terms used in equation (84) are calculated in equations (86).

Each term in equations (85) is discretized using central differences with coefficients computed by averaging elements of the transformation matrix. Equation (87) is an example of how an embodiment of the present invention may calculate the first term in equation (85). The rest of the terms in equation (84) may be calculated in a similar manner.

Spacial Discretizations of Viscoelastic Stress Equations Evaluation of the Advection Term

Referring to FIG. 7A the viscoelastic stress tensor τ_(i,j) ^(n) is co-located at the cell centers along with the velocity and level set values. Referring to FIG. 7B the time-centered viscoelastic stress tensor τ_(i+1/2,j) ^(n+1/2), which may be thought of as a viscoelastic stress predictor, is co-located at the middle point of each edge along with the time-centered velocity and time-centered level set values. The time centered advection term in the viscoelastic stress equation may be evaluated using equation (88) which can be simply derived from equation (44) in the computational space.

An embodiment of the present invention may employ equation (88) as the corrector step in a predictor corrector scheme. The time-centered edge stress tensor τ^(n+1/2) is obtained by doing a Taylor expansion on τ in both space and time. The time derivative τ_(t) ^(n) at time step n may be substituted by the viscoelastic stress equation (49). Evaluating the time centered stress tensor may include extrapolating from both sides of the edge and then applying a Godunov type upwinding to decide which extrapolation to use.

Equation (89) may be used to extrapolate from the left. The matrix G as used in equation (89) is defined in equation (90). Equation (91) may be used to extrapolate from the right. A method employing monotonicity-limited central differences may be used to evaluate the normal slopes of the stress tensor τ. The method of employing monotonicity-limited central differences for the stress tensor τ is similar to the process described in equations (80)-(82). In an embodiment of the present invention the normal slope of the stress tensor is τ_(ξ) or τ_(η). If extrapolation is done from the left and the right than the normal slope is τ_(ξ). While if we do extrapolation from above and below than the normal slope is τ_(η). The limiting is done on each component of the viscoelastic stress tensor at each full time step. The transverse derivative term ( wτ_(η))_(i,j) may be evaluated by using an upwinding method.

Choosing which time centered stress tensor extrapolation to use may be based on a rule such as the one described in equation (92). The left hand extrapolation (89) is used if the transformed convection velocity in the computational space is positive. The right hand extrapolation (91) is used if the transformed convection velocity in the computational space if negative. An average of the right and left extrapolation is used if the transformed convection velocity in the computational space is zero.

The time centered stress tensor as calculated using the decision tree shown in equation (92) is used in equation (88) to calculate the convection term in the viscoelastic stress equation. The last term in equation (88) may be calculated by taking a local spatial average of the four time-centered edge velocities and stresses as shown in equation (93)

Evaluation of Other Upper-Convected Derivative Terms

The other terms of the upper-convected derivate (49) may all be evaluated in a similar manner. The following is how the first term (94) of the upper-convected derivative (49) may be evaluated in the computational space using time-centered cell edge velocities and viscoelastic stress tensor.

The cell centered time-centered stress tensor may be evaluated by taking a spatial average of the four local edge centered time-centered stress tensors as shown in equation (95). The first term in the parentheses of equation (94) may be calculated using the equation (96). The time centered spatial derivatives of the fluid velocity may be is calculated by central differences in the manner shown in equation (97). The second and third terms in the parentheses of equation (94) may be evaluated in a similar manner. Equation (98) is an example of how the second term may be evaluated by averaging the time centered edge velocities.

The Divergence of Viscoelastic Stresses

The divergence of the time centered viscoelastic stresses as used in the fifth term of equation (55) may be evaluated using equation (99). The divergence of the cell-centered time centered stress tensor may be calculated using the central difference method along with edge centered time centered stress tensors. The cell centered time centered vector which is the last term of equation (99), may be approximated by averaging edge centered time centered vector quantities. The cell edge transformation matrices may be approximated with a spatial average of two of the neighboring cell centered transformation matrices as shown in equation (100). Please note that in the embodiment of the present invention described here the transformation matrices are time independent. An individual skilled in the art would appreciate how to implement the invention if the transformation matrices evolved along with the rest of the simulation.

Thickness of the Interface

Because of the numerical difficulty caused by evaluating the Dirac delta function and by the sharp change of ρ and μ across the interface 202, A smoothed Heavyside function may take the form of equation (101). The Dirac delta function may be redefined as the derivative of the smoothed Heavyside function as in equation (102). The thickness parameter ε is defined in equation (103) and is related to the average mesh size. Alternatively, the thickness parameter ε may be related to the smallest mesh size. The scaling parameter α as used in equation (103) may take the range of approximately 1.5 to 2. As the mesh size decreases so does the thickness of the interface 202. Nonetheless, for any numerically practical choices, the interface 202 will necessarily have some smearing.

Constraint on Time Step

An embodiment of the present invention in which the time integration scheme is higher order explicit and may include a constraint on time step Δt as determined by a Courant-Friedrichs-Lewy (CFL) condition such as the one described in equation (104). In which h=min(Δr, Δz) and {right arrow over (F)} is defined in equation (71).

Results

FIG. 8A is an illustration of a Newtonian fluid 800. The Newtonian fluid 800 is in a cylinder 802. The cylinder includes a rotating rod 804. As the Newtonian fluid 800 rotates the fluid 800 is pushed towards the outer edge of the cylinder 802 by centrifugal forces. The increased volume of fluid 800 along the edge of the cylinder forces the interface 202 to rise along the outer edge of the cylinder.

FIG. 8B is an illustration of rod climbing behavior also known as the Weissenberg effect in which a viscoelastic fluid 806 is placed in a container 802 with a rotating rod 804. Unlike the Newtonian fluid the viscoelastic fluid 806 climbs the rod. The present invention is an effective means for simulating systems such as those illustrated in FIG. 8B.

System

Having described the details of the invention, an exemplary system 1000, which may be used to implement one or more aspects of the present invention will now be described with reference to FIG. 9. As illustrated in FIG. 9, the system includes a central processing unit (CPU) 1001 that provides computing resources and controls the computer. The CPU 1001 may be implemented with a microprocessor or the like, and may also include a graphics processor and/or a floating point coprocessor for mathematical computations. The system 1000 may also include system memory 1002, which may be in the form of random-access memory (RAM) and read-only memory (ROM).

A number of controllers and peripheral devices may also be provided, as shown in FIG. 9. An input controller 1003 represents an interface to various input device(s) 1004, such as a keyboard, mouse, or stylus. There may also be a scanner controller 1005, which communicates with a scanner 1006. The system 1000 may also include a storage controller 1007 for interfacing with one or more storage devices 1008 each of which includes a storage medium such as magnetic tape or disk, or an optical medium that might be used to record programs of instructions for operating systems, utilities and applications which may include embodiments of programs that implement various aspects of the present invention. Storage device(s) 1008 may also be used to store processed data or data to be processed in accordance with the invention. The system 1000 may also include a display controller 1009 for providing an interface to a display device 1011, which may be a cathode ray tube (CRT), or a thin film transistor (TFT) display. The system 1000 may also include a printer controller 1012 for communicating with a printer 1013. A communications controller 1014 may interface with one or more communication devices 1015 which enables the system 1000 to connect to remote devices through any of a variety of networks including the Internet, a local area network (LAN), a wide area network (WAN), or through any suitable electromagnetic carrier signals including infrared signals.

In the illustrated system, all major system components may connect to a bus 1016, which may represent more than one physical bus. However, various system components may or may not be in physical proximity to one another. For example, input data and/or output data may be remotely transmitted from one physical location to another. In addition, programs that implement various aspects of this invention may be accessed from a remote location (e.g., a server) over a network. Such data and/or programs may be conveyed through any of a variety of machine-readable medium including magnetic tape or disk or optical disc, or a transmitter, receiver pair.

The present invention may be conveniently implemented with software. However, alternative implementations are certainly possible, including a hardware implementation or a software/hardware implementation. Any hardware-implemented functions may be realized using ASIC(s), digital signal processing circuitry, or the like. Accordingly, the “means” terms in the claims are intended to cover both software and hardware implementations. Similarly, the term “machine-readable medium” as used herein includes software, hardware having a program of instructions hardwired thereon, or a combination thereof. With these implementation alternatives in mind, it is to be understood that the figures and accompanying description provide the functional information one skilled in the art would require to write program code (i.e., software) or to fabricate circuits (i.e., hardware) to perform the processing required.

In accordance with further aspects of the invention, any of the above-described methods or steps thereof may be embodied in a program of instructions (e.g., software), which may be stored on, or conveyed to, a computer or other processor-controlled device for execution on a computer readable medium. Alternatively, any of the methods or steps thereof may be implemented using functionally equivalent hardware (e.g., application specific integrated circuit (ASIC), digital signal processing circuitry, etc.) or a combination of software and hardware.

While the invention has been described in conjunction with several specific embodiments, it is evident to those skilled in the art that many further alternatives, modifications and variations will be apparent in light of the foregoing description. Thus, the invention described herein is intended to embrace all such alternatives, modifications, applications and variations as may fall within the spirit and scope of the appended claims. ⅆ τ ⅆ t + G μ ⁢ τ = s ( 1 ) τ = μ ⁢   ⁢ s ( 2 ) ρ 1 ⁢ D ⁢u -> 1 Dt = - ∇ p 1 + ∇ · ( 2 ⁢ μ 1 ⁢ D 1 ) + ∇ · τ 1 ∇ · u -> 1 = 0 D ⁢   ⁢ τ 1 D ⁢   ⁢ t = τ 1 · ( ∇ u -> 1 ) + ( ∇ u -> 1 ) T · τ 1 - 1 λ 1 ⁢ ( τ 1 - 2 ⁢ μ p ⁢   ⁢ 1 ⁢ D 1 ) ( 3 ) ρ 2 ⁢ D ⁢ u -> 2 Dt = - ∇ p 2 + ∇ · ( 2 ⁢ μ 2 ⁢ D 2 ) ∇ · u -> 2 = 0 ( 4 ) D i = 1 2 ⁡ [ ∇ u -> i + ( ∇ u -> i ) T ] i = 1 , 2 u -> i = u i ⁡ ( r , z ) ⁢ e ^ r + v i ⁡ ( r , z ) ⁢ e ^ θ + w i ⁡ ( r , z ) ⁢ e ^ z i = 1 , 2 ( 5 ) D ⁢ u -> i Dt = [ ∂ ∂ t + ( u -> i · ∇ ) ] ⁢ u -> i ( 6 ) D ⁢   ⁢ τ 1 Dt - τ 1 · ( ∇ u -> 1 ) - ( ∇ u -> 1 ) T · τ 1 ( 7 ) ( 2 ⁢ μ 1 ⁢ D 1 - 2 ⁢ μ 2 ⁢ D 2 ) · n ^ = ( p 1 - p 2 + σ ⁢   ⁢ κ ) ⁢ n ^ ( 8 ) n ^ = ∇ ϕ  ∇ ϕ  ⁢ ❘ ϕ = 0 ( 9 ) κ = ∇ · n ^ = ∇ · ( ∇ ϕ  ∇ ϕ  ) ⁢ ❘ ϕ = 0 ( 10 ) ∇ · u -> = 0 ( 11 ) ρ ⁡ ( ϕ ) ⁢ D ⁢ u -> Dt = - ∇ p + ∇ · ( 2 ⁢ μ ⁡ ( ϕ ) ⁢ D ) + ∇ · τ - σκ ⁡ ( ϕ ) ⁢ δ ⁡ ( ϕ ) ⁢ ∇ ϕ ( 12 ) D ⁢   ⁢ τ Dt = τ · ( ∇ u -> ) + ( ∇ u -> ) T · τ - 1 λ ⁡ ( ϕ ) ⁢ ( τ - 2 ⁢ μ p ⁡ ( ϕ ) ⁢ D ) ( 13 ) x = Lx ′ y = Ly ′ t = L U ⁢ t ′   p = ρ 1 ⁢ U 2 ⁢ p ′ u -> = U ⁢ u -> ′ τ = ρ 1 ⁢ U 2 ⁢ τ ′   ρ = ρ 1 ⁢ ρ ′ μ = μ 1 ⁢ μ ′ λ = L U ⁢ λ ′ μ p = μ 1 ⁢ μ p ′ ( 14 ) ∇ · u -> = 0 ( 15 ) D ⁢ u -> Dt = - 1 ρ ⁡ ( ϕ ) ⁢ ∇ p + 1 ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ · ( 2 ⁢ μ ⁡ ( ϕ ) ⁢ D ) - 1 ρ ⁡ ( ϕ ) ⁢ We ⁢ κ ⁡ ( ϕ ) ⁢ δ ⁡ ( ϕ ) ⁢ ∇ ϕ + ∇ · τ ( 16 ) D ⁢   ⁢ τ Dt = τ · ( ∇ u -> ) + ( ∇ u -> ) T · τ - 1 λ ⁡ ( ϕ ) ⁢ ( τ - 2 ⁢ μ p ⁡ ( ϕ ) Re p ⁢ D ) ( 17 ) ρ ⁡ ( ϕ ) = { 1 ϕ ≥ 0 ρ 2 ρ 1 ϕ < 0 λ ⁡ ( ϕ ) = { λ ϕ ≥ 0 0 ϕ < 0 μ ⁡ ( ϕ ) = { 1 ϕ ≥ 0 μ 2 μ 1 ϕ < 0 μ p ⁡ ( ϕ ) = { μ p ⁢   ⁢ 1 μ 1 ϕ ≥ 0 0 ϕ < 0 ( 18 ) Re = ρ 1 ⁢ UL μ 1 , Re p = ρ 1 ⁢ UL μ p ⁢   ⁢ 1 , We = ρ 1 ⁢ U 2 ⁢ L σ ( 19 ) ∂ ϕ ∂ t + u -> · ∇ ϕ = 0 ( 20 ) u -> = u -> BC ( 21 ) p = p BC , ∂ u -> ∂ n ^ = 0 ( 22 ) X = Φ ⁡ ( Ξ ) ( 23 ) J = g ⁢   ⁢ det ⁢ ∇ ⁢ Φ = g ⁢   ⁢ det ⁡ ( r ξ 0 r η 0 1 0 z ξ 0 z η ) = 2 ⁢ π ⁢   ⁢ r ⁡ ( r ξ ⁢ z η - r η ⁢ z ξ ) ( 24 ) T = J g ⁡ [ ∇ ⁢ Φ ] - 1 = ( z η 0 - r η 0 J g 0 - z ξ 0 r ξ ) ( 25 ) u _ -> ⁡ ( ) = gT ⁢ u -> ⁡ ( X ) τ _ ⁡( ) = gT ⁢   ⁢ τ ⁡ ( X ) ( 26 ) ∇ p = ⁢ ( p r 0 p z ) = ( p ξ ⁢ ξ r + p η ⁢ η r 0 p ξ ⁢ ξ z + p η ⁢ η z ) = ⁢ ( ξ r 0 η r 0 1 0 ξ z 0 η z ) ⁢ ( p ξ 0 p η ) = ⁢ g J ⁢ ( z η 0 - z ξ 0 J g 0 - r η 0 r ξ ) ⁢ ( p ξ 0 p η ) = ⁢ g J ⁢ T T ⁢∇ ⁢ p ( 27 ) ∇ · u -> = 1 J ⁢ ∇ ⁢ · u _ -> = 0 ( 28 ) ∇ ⁢ · u _ -> = ⁢ ∇ ⁢ · [ g ⁡ ( z η 0 - r η 0 J g 0 - z ξ 0 r ξ ) ⁢ ( u v w ) ] = ⁢ ∇ ⁢ · [ g ⁡ ( uz η - wr η ) ⁢ Jv ⁢   ⁢ g ⁡ ( wr ξ - uz ξ ) ] = ⁢ ∇ ⁢ · [ g ⁡ ( uz η - wr η ) ⁢ g ⁡ ( r ξ ⁢ z η - r η ⁢ z ξ ) ⁢ v ⁢   ⁢ g ⁡ ( wr ξ - uz ξ ) ] = ⁢ g , ξ ⁡ ( uz η - wr η ) + g ⁡ ( uz η - wr η ) , ξ + g , η ⁡ ( wr ξ - uz ξ ) + g ⁡ ( wr ξ - uz ξ ) , η = ⁢ 2 ⁢ π ⁢ { ( r ξ ⁢ z η - r η ⁢ z ξ ) ⁢ u + r [ z η ⁡ ( u r ⁢ r ξ + u z ⁢ z ξ ) - z ξ ⁡ ( u r ⁢ r η + u z ⁢ z η ) - ⁢ r η ⁡ ( w r ⁢ r ξ + w z ⁢ z ξ ) + r ξ ⁡ ( w r ⁢ r η + w z ⁢ z η ) ] } = ⁢ 2 ⁢ π ⁡ [ ( r ξ ⁢ z η - r η ⁢ z ξ ) ⁢ u + r ⁡ ( r ξ ⁢ z η - r η ⁢ z ξ ) ⁢ ( u r + w z ) ] = ⁢ J ⁢ ∇ · u -> ( 29 ) ( u -> · ∇ ) ⁢ u -> = ⁢ ( u ⁢ ∂ ∂ r + w ⁢ ∂ ∂ z ) ⁢ ( u ⁢   ⁢ v ⁢   ⁢ w ) T + v r ⁢ ( - v ⁢   ⁢ u ⁢   ⁢ 0 ) T = ⁢ 1 J ⁡ [ ( gT ⁢ u -> ) · ∇ ] ⁢ u -> + v r ⁢ ( - v ⁢   ⁢u ⁢   ⁢ 0 ) T = ⁢ 1 J ⁢ ( u _ -> · ∇ ) ⁢ u -> + v r ⁢ ( - v ⁢   ⁢ u ⁢   ⁢ 0 ) T = ⁢ 1 J ⁢ ( u _ -> · ∇ ) ⁢ u -> + v r ⁢ u -> ⊥ ( 30 ) ( u -> · ∇ ) ⁢ ϕ = 1 J ⁢ ( u _ -> · ∇ ) ⁢ ϕ ( 31 ) ∇ · ( 2 ⁢ μ ⁡ ( ϕ ) ⁢ D ) ρ ⁡ ( ϕ ) ⁢ Re = ( ∇ μ ⁡ ( ϕ ) ) · ( ∇ u -> + ( ∇ u -> ) T ) + μ ⁡ ( ϕ ) ⁢ ∇ · ( ∇ u -> + ( ∇ u -> ) T ) ρ ⁡ ( ϕ ) ⁢ Re ( 32 ) ∇ · [ ( ∇ u -> ) ⁢ T ] = 0 ( 33 ) 1 ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ · [ 2 ⁢ μ ⁡ ( ϕ ) ⁢ D ] = g J ⁢   ⁢ ρ ⁡ ( ϕ ) ⁢ Re ⁡ [ T T ⁢ ∇ ⁢ μ ⁡ ( ϕ ) ] · [ g J ⁢ T T ⁢ ∇ ⁢ u -> + ( g J ⁢ T T ⁢ ∇ ⁢ u -> ) T + r ⁢ ∂ ( v / r ) ∂ r ⁢ I 0 ] + μ ⁡ ( ϕ ) ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ 2 ⁢ u -> ( 34 ) I 0 = ( 0 1 0 1 0 0 0 0 0 ) ( 35 ) ∇ · ∇ u -> = 1 r ⁢ ( ∂ ∂ r ∂ r ⁢ ∂ θ ∂ ∂ z ) T ⁢ ( r ⁡ ( u r v r w r 0 0 0 u z v z w z ) ) - ( u r 2 v r 2 0 ) ( 36 ) ( u r v r w r 0 0 0 u z v z w z ) = ⁢ ( ξ r 0 η r 0 1 0 ξ z 0 η z ) ⁢ ( u ξ v ξ w ξ 0 0 0 u η v η w η ) = ⁢ g J ⁢ T T ⁡ ( u ξ v ξ w ξ 0 0 0 u η v η w η ) ( 37 ) ( ∂ ∂ r ∂ r ⁢ ∂ θ ∂ ∂ z ) T ⁢ ( α 11 α 12 α 13 0 0 0 α 31 α 32 α 33 ) ⁢ = g J ⁢ ( ∂ ∂ ξ ∂ r ⁢ ∂ θ ∂ ∂ η ) T ⁢ { ( z η 0 - r η 0 1 0 - z ξ 0 r ξ ) ⁢ ( α 11 α 12 α 13 0 0 0 α 31 α 32 α 33 ) } ⁢ = g J ⁢ ∇ ⁢ · { T ⁡ ( α 11 α 12 α 13 0 0 0 α 31 α 32 α 33 ) } ( 38 ) μ ⁡ ( ϕ ) ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ · ∇ u -> = μ ⁡ ( ϕ ) J ⁢   ⁢ ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ ⁢ · { g 2 J ⁢ TT T ⁢ ∇ ⁢ u -> } - μ ⁡ ( ϕ ) ρ ⁡ ( ϕ ) ⁢ Re ⁢ ( u r 2 v r 2 0 ) ( 39 ) 1 ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ · [ 2 ⁢ μ ⁡ ( ϕ ) ⁢ D ] = ⁢ g J ⁢   ⁢ ρ ⁡ ( ϕ ) ⁢ Re ⁡ [ T T ⁢ ∇ ⁢ μ ⁡ ( ϕ ) ] · [ g J ⁢ T T ⁢ ∇ ⁢ u -> + ( g J ⁢ T T ⁢ ∇ ⁢ u -> ) T + r ⁢ ∂ ( v / r ) ∂ r ⁢ I 0 ] + ⁢ μ ⁡ ( ϕ ) J ⁢   ⁢ ρ ⁡ ( ϕ ) ⁢ Re ⁢ ∇ ⁢ · { g 2 J ⁢ TT T ⁢ ∇ ⁢ u -> } - μ ⁡ ( ϕ ) ρ ⁡ ( ϕ ) ⁢ Re ⁢ ( u r 2 v r 2 0 ) ⁢ ( 40 ) κ ⁡ ( ϕ ) = ⁢ ∇ · ( ∇ ϕ  ∇ ϕ  ) = ⁢ 1 J ⁢ ∇ ⁢ · ( gT ⁢   ⁢ T T ⁢ ∇ ⁢ ϕ  T T ⁢ ∇ ⁢ϕ  ) ( 41 ) - 1 ρ ⁡ ( ϕ ) ⁢ We ⁢ κ ⁡ ( ϕ ) ⁢ δ ⁡ ( ϕ ) ⁢ ∇ ϕ = - g ⁢   ⁢ δ ⁡ ( ϕ ) J 2 ⁢ ρ ⁡ ( ϕ ) ⁢ We ⁢ ∇ · ( gT ⁢   ⁢ T T ⁢ ∇ ⁢ ϕ  T T ⁢ ∇ ⁢ ϕ  ) ⁢ ( T T ⁢ ∇ ⁢ ϕ ) ( 42 ) ∇ · τ = ⁢ 1 r ⁢ ( ∂ ∂ r ⁢ ∂ r ⁢ o ^ ⁢ θ ⁢ ∂ ∂ z ) · ( r ⁢   ⁢ τ ) + 1 r ⁢( - τ θθ ⁢   ⁢ τ r ⁢   ⁢ θ ⁢   ⁢ 0 ) T = ⁢ 1 J ⁢ ∇ ⁢ · ( gT ⁢   ⁢ τ ) + 1 r ⁢ ( - τ θθ ⁢   ⁢ τ r ⁢   ⁢ θ ⁢   ⁢ 0 ) T = ⁢ 1 J ⁢ ∇ ⁢ · τ _ + 1 r ⁢ ( - τ θθ ⁢   ⁢ τ r ⁢   ⁢ θ ⁢   ⁢ 0 ) T ( 43 ) ( u -> · ∇ ) ⁢ τ = ⁢ [ ( u ⁢ e ^ r + v ⁢ e ^ θ + w ⁢ e ^ z ) · ( e ^ r ⁢ ∂ ∂ r + e ^ θ ⁢ 1 r ⁢ ∂ ∂ θ + e ^ z ⁢ ∂ ∂ z ) ] ⁢ τ = ⁢ ( u ⁢ ∂ ∂ r + v r ⁢ ∂ ∂ θ + w ⁢ ∂ ∂ z ) ⁢ τ = ( u ⁢ ∂ ∂ r + w ⁢ ∂ ∂ z ) ⁢ τ + v r ⁢ ∂ ∂ θ ⁢τ = ⁢ 1 J ⁢ ( u _ -> · ∇ ) ⁢ τ + v r ⁢ ∂ ∂ θ ⁢ τ = ⁢ 1 J ⁢ ( u _ -> · ∇ ) ⁢ τ + v r ⁢ τ v ( 44 ) τ v = ⁢ ∂ ∂ θ ⁢ τ = ⁢ ∂ ∂ θ ⁢ ( τ rr ⁢ e ^ r ⁢ e ^ r + τ r ⁢   ⁢ θ ⁢ e ^ r ⁢ e ^ θ + τ rz ⁢ e ^ r ⁢ e ^ z + τ θ ⁢   ⁢ r ⁢ e ^ θ ⁢ e ^ r + τ θθ ⁢ e ^ θ ⁢ e ^ θ + τ θ ⁢   ⁢ z ⁢ e ^ z ⁢ e ^ z + τ zr ⁢ e ^ θ ⁢ e ^ r + τ z ⁢   ⁢ θ ⁢ e ^ z ⁢ e ^ θ + τ zz ⁢ e ^ z ⁢ e ^ z ) = ⁢ ( τ rr ⁡ ( e ^ θ ⁢ e ^ r + e ^ r ⁢ e ^ θ ) + τ r ⁢   ⁢ θ ⁡ ( e ^ θ ⁢ e ^ θ - e ^ r ⁢ e ^ r ) + τ rz ⁢ e ^ θ ⁢ e ^ z + τ r ⁢   ⁢ θ ⁡ ( e ^ θ ⁢ e ^ θ - e ^ r ⁢ e ^ r ) + τ θθ ⁡ ( - e ^ θ ⁢ e ^ r - e ^ r ⁢ e ^ θ ) - τ θz ⁢ e ^ r ⁢ e ^ z + τ rz ⁢ e ^ z ⁢ e ^ θ + τ θ ⁢   ⁢ z ⁢ e ^ z ⁢ e ^ r + 0 ) τ v = ⁢ ( - 2 ⁢ τ r ⁢   ⁢ θ τ rr - τ θθ - τ θz τ rr - τ θθ 2 ⁢ τ r ⁢   ⁢ θ τ rz - τ θz τ rz 0 ) ( 45 ) τ · ∇ u -> = τ · [ g J ⁢ T T ⁢ ∇ ⁢ u -> + u r ⁢ I 22 - v r ⁢ I 21 ] ( 46 ) I 21 = ( 0 0 0 1 0 0 0 0 0 ) ⁢   ⁢ I 22 = ( 0 0 0 0 1 0 0 0 0 ) ( 47 ) ∂ u -> ∂ t + 1 J ⁢ ( u _ -> · ∇ ) ⁢ u -> + v r ⁢ u -> ⊥ = ⁢ - 1 ρ ⁡ ( ϕ ) ⁢ J ⁢ gT T ⁢ ∇ ⁢ p - g ⁢   ⁢ δ ⁡ ( ϕ ) J 2 ⁢ ρ ⁡ ( ϕ ) ⁢ We ⁢ ∇ ⁢ · ⁢ ( gT ⁢   ⁢ T T ⁢ ∇ ⁢ ϕ  T T ⁢ ∇ ⁢ ϕ  ) ⁢ ( T T ⁢ ∇ ⁢ ϕ ) + ⁢ ( Viscosity ⁢   ⁢ term ) + 1 J ⁢ ∇ ⁢ · τ _ + 1 r ⁢ ( - τ θθ ⁢   ⁢ τ r ⁢   ⁢ θ ⁢   ⁢ 0 ) T ( 48 ) ∂ τ ∂ t + 1 J ⁢ ( u _ -> · ∇ ) ⁢ τ + v r ⁢ τ v = τ · ⁢ [ g J ⁢ T T ⁢∇ ⁢ u -> + u r ⁢ I 22 - v r ⁢ I 21 ] + ⁢ [ g J ⁢ T T ⁢ ∇ ⁢ u -> + u r ⁢ I 22 - v r ⁢ I 21 ] T · τ T - ⁢ 1 λ ⁡ ( ϕ ) ⁢ { τ - μ p ⁡ ( ϕ ) Re p ⁡ [ g J ⁢ T T ⁢ ∇ ⁢ u -> + ( g J ⁢ T T ⁢ ∇ ⁢ u -> ) T + r ⁢ ∂ ( v / r ) ∂ r ⁢ I 0 ] } ( 49 ) ∇ ⁢ · u _ -> = 0 ( 50 ) ∂ ϕ ∂ t + 1 J ⁢ u _ -> · ∇ ⁢ ϕ = 0 ⁢ ( 51 ) u -> n = u -> ⁡ ( t n ) ( 52 ) ϕ n + 1 = ϕ n - Δ ⁢   ⁢ t ⁡ [ u -> · ∇ ϕ ] n + 1 / 2 ( 53 ) ϕ n + 1 / 2 = 1 2 ⁢ ( ϕ n + ϕ n + 1 ) ( 54 ) u -> ** = u -> n + Δ ⁢   ⁢ t ⁢ { - [ ( u -> · ∇ ) ⁢ u -> ] n + 1 / 2 - 1 ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∇ p n - 1 / 2 + ⁢ 1 ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ Re ⁢ ∇ · [ μ ⁡ ( ϕ n + 1 / 2 ) ⁢ D n ] + ∇ · τ n + 1 / 2 - ⁢ 1 ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ We ⁡ [ κ ⁡ ( ϕ ) ⁢ δ ⁡ ( ϕ ) ⁢ ∇ ϕ ] n + 1 / 2 } ( 55 ) u -> ** = u -> * - Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ Re ⁢ ∇ · [ μ ⁡ ( ϕ n + 1 / 2 ) ⁢ D * ] ( 56 ) D * = 1 2 ⁡ [ ∇ u -> * + ( ∇ u -> * ) T ] ( 57 ) u -> * ← u -> * + Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∇ p n - 1 / 2 ( 58 ) u -> n + 1 = u -> * - Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∇ p n + 1 / 2 ( 59 ) ∇ · u -> * = ∇ · ( Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∇ p n + 1 / 2 ) ( 60 ) ∫ Ω ⁢ u -> * · ∇ ψ ⁢ ⅆ V = ∫ Ω ⁢ Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∇ p n + 1 / 2 · ∇ ψ ⁢ⅆ V + ∫ Γ 1 ⁢ ψ ⁢ u -> BC · n ^ ⁢ ⅆ S ( 61 ) Δ ⁢   ⁢ t ρ ⁡ ( ϕ n + 1 / 2 ) ⁢ ∂ p n + 1 / 2 ∂ n ^ = ( u -> * - u -> BC ) · n ^ ( 62 ) τ n + 1 - τ n Δ ⁢   ⁢t = [ - ( u -> · ∇ ) ⁢ τ + τ · ( ∇ u -> ) + ( ∇ u -> ) T · τ ] n + 1 / 2 - ⁢ 1 λ ⁡ ( ϕ n + 1 / 2 ) ⁢ ( τ n + 1 - 2 ⁢ μ p ⁡ ( ϕ n + 1 / 2 ) Re p ⁢ D n + 1 / 2 ) ( 63 ) ( 1 + Δ ⁢   ⁢ t λ p ⁡ ( ϕ n + 1 / 2 ) ) ⁢ τ n + 1 = ⁢ τ n + Δ ⁢   ⁢ t ⁡ [ - ( u -> · ∇ ) ⁢ τ + τ · ( ∇ u -> ) + ( ∇ u -> ) T · τ ] n + 1 / 2 + ⁢ 2 ⁢ Δ ⁢   ⁢ t ⁢   ⁢ μ p ⁡ ( ϕ n + 1 / 2 ) λ ⁡ ( ϕ n + 1 / 2 ) ⁢ Re p ⁢ D n + 1 / 2 ( 64 ) u -> ≡ u ⁡ ( r , z ) ⁢ e ^ r + v ⁡ ( r , z ) ⁢ e ^ θ + w ⁡ ( r , z ) ⁢ e ^ z ⁢ ⁢ p ≡ p ⁡ ( r , z ) ⁢   ⁢ ϕ ≡ ϕ ⁡ ( r , z ) ⁢ ⁢ τ ≡ ( τ rr τ r ⁢   ⁢ θ τ rz τ r ⁢   ⁢ θ τ θθ τ θ ⁢   ⁢ z τ rz τ θz τ zz ) ( 65 ) X i , j ≡ 1 4 ⁢ ( X i - 1 2 , j - 1 2 + X i - 1 2 , j + 1 2 + X i + 1 2 , j - 1 2 + X i + 1 2 , j + 1 2 ) ( 66 ) ( X ξ ) i , j = 1 2 ⁢ ( X i + 1 2 , j + 1 2 - X i - 1 2 , j + 1 2 + X i + 1 2 , j - 1 2 - X i - 1 2 , j - 1 2 ) ( 67 ) [ ( u -> · ∇ ) ⁢ u -> ] i , j n + 1 / 2 = ⁢ [ 1 J ⁢ ( u _ -> · ∇ ) ⁢ u -> + v r ⁢ u -> ⊥ ] i , j n + 1 / 2 = ⁢ 1 J i , j ⁡ [ u _ i + 1 / 2 , j n + 1 / 2 + u _ i - 1 / 2 , j n + 1 / 2 2 ⁢ ( u -> i + 1 / 2 , j n + 1 / 2 - u -> i - 1 / 2 , j n + 1 / 2 ) + w _ i , j + 1 / 2 n + 1 / 2 + w _ i , j - 1 / 2 n + 1 / 2 2 ⁢ ( u -> i , j + 1 / 2 n + 1 / 2 - u -> i , j - 1 / 2 n + 1 / 2 ) ] + ⁢ v i , j n + 1 / 2 r i , j ⁢ u -> ⊥ , i , j n + 1 / 2 ( 68 ) [ ( u -> · ∇ ) ⁢ ϕ ] i , j n + 1 / 2 = [ 1 J ⁢ ( u _ -> · ∇ ) ⁢ ϕ ] i , j n + 1 / 2 = ⁢ 1 J i , j ⁡ [ u _ i + 1 / 2 , j n + 1 / 2 + u _ i - 1 / 2 , j n + 1 / 2 2 ⁢ ( ϕ i + 1 / 2 , j n + 1 / 2 - ϕ i - 1 / 2 , j n + 1 / 2 ) + w _ i , j + 1 / 2 n + 1 / 2 + w _ i , j - 1 / 2 n + 1 / 2 2 ⁢ ( ϕ i , j + 1 / 2 n + 1 / 2 - ϕ i , j - 1 / 2 n + 1 / 2 ) ] ( 69 ) u -> i + 1 / 2 , j n + 1 / 2 , L = ⁢ u -> i , j n + 1 2 ⁢ u -> ξ , i , j n + Δ ⁢   ⁢ t 2 ⁢ u -> t , i , j n = ⁢ u -> i , j n + ( 1 2 - Δ ⁢   ⁢ t 2 ⁢ J i , j ⁢ ⁢ u -> i , j n ) ⁢ u -> ξ , i , j n - Δ ⁢   ⁢ t 2 ⁢ J i , j ⁢ ( w _ ⁢ u -> η ) i , j n - Δ ⁢   ⁢ t 2 ⁢ ( v r ⁢ u -> ⊥ ) i , j n + ⁢ Δ ⁢   ⁢ t 2 ⁢ F -> i , j n ( 70 ) F -> i , j n = { - g ρ ⁡ ( ϕ ) ⁢ J ⁢ T T ⁢ ∇ Ξ ⁢ p + ( Viscosity ⁢   ⁢ term ) + ( Surface ⁢   ⁢ tension ) + 1 J ⁢ ∇ Ξ ⁢ · τ _ + 1 r ⁢ ( - τ θθ ⁢   ⁢ τ r ⁢   ⁢θ ⁢   ⁢ 0 ) T } i , j n ( 71 ) u -> i + 1 / 2 , j n + 1 / 2 , R = ⁢ u -> i + 1 , j n - 1 2 ⁢ u -> ξ , i + 1 , j n + Δ ⁢   ⁢ t 2 ⁢ u -> t , i + 1 , j n = ⁢ u -> i + 1 , j n - ( 1 2 + Δ ⁢   ⁢ t 2 ⁢ J i + 1 , j ⁢ u _ i + 1 , j n ) ⁢ u -> ξ , i + 1 , j n - ⁢ Δ ⁢   ⁢ t 2 ⁢ J i + 1 , j ⁢ ( w _ ⁢ u -> η ) i + 1 , j n - Δ ⁢   ⁢ t 2 ⁢ ( v r ⁢ u -> ⊥ ) i + 1 , j n + ⁢ Δ ⁢   ⁢ t 2 ⁢ F -> i + 1 , j n ( 72 ) u _ i + 1 / 2 , j n + 1 / 2 = { u _ ⁢ u i + 1 / 2 , j n + 1 / 2 , L if ⁢   ⁢ u _ ⁢   i + 1 / 2 , j n + 1 / 2 , L > 0 & ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 , L + u _ i + 1 / 2 , j n + 1 / 2 , R > 0 u i + 1 / 2 , j n + 1 / 2 , R if ⁢   ⁢ u _ ⁢   i + 1 / 2 , j n + 1 / 2 , R < 0 & ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 , L + u _ i + 1 / 2 , j n + 1 / 2 , R < 0 0 ⁢ u _ otherwise ( 73 ) ψ i + 1 / 2 , j n + 1 / 2 = { ψ i + 1 / 2 , j n + 1 / 2 , L if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 > 0 ψ i + 1 / 2 , j n + 1 / 2 , R if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 < 0 ⁢   ⁢ ψ ≡ { u -> , ϕ } ψ i + 1 / 2 , j n + 1 / 2 , L + ψ i + 1 / 2 , j n + 1 / 2 , R 2 if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 = 0 ( 74 ) u -> e - 1 ρ ⁡ ( ϕ n ) ⁢ ∇ q ( 75 ) ∇ · ( 1 ρ ⁡ ( ϕ n ) ⁢ ∇ q ) = ∇ · u -> e ( 76 ) ∇ Ξ ⁢ · u _ -> e = ∇ Ξ ⁢ · ( g 2 ρ ⁡ ( ϕ n ) ⁢ J ⁢ TT T ⁢ ∇ Ξ ⁢ q ) ( 77 ) q = Δ ⁢   ⁢ t ⁡ ( p BC ⁡ ( t n + 1 / 2 ) - p BC ⁡ ( t n - 1 / 2 ) ) ( 78 ) u _ -> e ← u _ -> e - g 2 ρ ⁡ ( ϕ n ) ⁢ J ⁢ TT T ⁢ ∇ Ξ ⁢ q . ( 79 ) D ξ c ⁡ ( u ) i , j = ( u i + 1 , j - u i - 1 , j ) / 2 ⁢ ⁢ D ξ + ⁡ ( u ) i , j = ( u i + 1 , j - u i , j ) ⁢ ⁢ D ξ - ⁡ ( u ) i , j = ( u i , j - u i - 1 , j ) ( 80 ) δ lim ⁡ ( u ) i , j = { min ⁡ ( 2 ⁢  D ξ - ⁡ ( u ) i , j  , 2 ⁢  D ξ + ⁡ ( u ) i , j  ) if ⁢   ⁢ ( D ξ - ⁡ ( u ) i , j ) ⁢ ( D ξ + ⁡ ( u ) i , j ) > 0 0 otherwise ( 81 ) ( u ξ ) i , j = min ⁡ (  D ξ c ⁡ ( u ) i , j  , δ lim ⁡ ( u ) i , j ) ⨯ sign ⁢   ⁢ ( D ξ c ⁡ ( u ) i , j ) ( 82 ) ( w _ ⁢ u -> η ) i , j n = max ⁡ ( w _ i , j n , 0 ) ⁢ ( u -> i , j n - u -> i , j - 1 n ) + min ⁡ ( w _ i , j n , 0 ) ⁢ ( u -> i , j + 1 n - u -> i , j n ) ( 83 ) v i , j n + 1 / 2 r i , j ⁢ u -> ⊥ , i , j n + 1 / 2 = 1 16 ⁢ r i , j ⁢ ( v i + 1 / 2 , j n + 1 / 2 + v i - 1 / 2 , j n + 1 / 2 + v i , j + 1 / 2 n + 1 / 2 + v i , j - 1 / 2 n + 1 / 2 ) ⁢ ⁢ ( u -> ⊥ , i + 1 / 2 , j n + 1 / 2 + u -> ⊥ , i - 1 / 2 , j n + 1 / 2 + u -> ⊥ , i , j + 1 / 2 n + 1 / 2 + u -> ⊥ , i , j - 1 / 2 n + 1 / 2 ) ( 84 ) ∇ Ξ ⁢ · ( g 2 J ⁢ TT T ⁢ ∇ Ξ ⁢ u -> ) = ( α ⁢   ⁢ u -> ξ ) ξ + ( β ⁢   ⁢ u -> ξ ) η + ( β ⁢   ⁢ u -> η ) ξ + ( γ ⁢   ⁢ u -> η ) η ( 85 ) α = ⁢ g 2 J ⁢ ( x η 2 + y η 2 ) β = ⁢ - g 2 J ⁢ ( x ξ ⁢ x η + y ξ ⁢ y η ) γ = ⁢ g 2 J ⁢ ( x ξ 2 + y ξ 2 ) ( 86 ) [ ( α ⁢   ⁢ u -> ξ ) ξ ] i , j = ⁢ ( α ⁢   ⁢ u -> ξ ) i + 1 / 2 , j - ( α ⁢   ⁢ u -> ξ ) i - 1 / 2 , j = ⁢ α i + 1 , j + α i , j 2 ⁢ ( u -> i + 1 , j - u -> i , j ) - α i , j + α i - 1 , j 2 ⁢ ( u -> i , j - u -> i - 1 , j ) ( 87 ) [ ( u -> · ∇ ) ⁢ τ ] i , j n + 1 / 2 = ⁢ [ 1 J ⁢ ( u _ -> · ∇ Ξ ) ⁢ τ + v r ⁢ τ v ] i , j n + 1 / 2 = ⁢ 1 J i , j ⁡ [ u _ i + 1 / 2 , j n + 1 / 2 + u _ i - 1 / 2 , j n + 1 / 2 2 ⁢ ( τ i + 1 / 2 , j n + 1 / 2 - τ i - 1 / 2 , j n + 1 / 2 ) + w _ i , j + 1 / 2 n + 1 / 2 + w _ i , j - 1 / 2 n + 1 / 2 2 ⁢ ( τ i , j + 1 / 2 n + 1 / 2 - τ i , j - 1 / 2 n + 1 / 2 ) ] + ⁢ v i , j n + 1 / 2 r i , j ⁢ τ v , i , j n + 1 / 2 ( 88 ) τ i + 1 / 2 , j n + 1 / 2 , L = ⁢ τ i , j n + 1 2 ⁢ τ ξ , i , j n + Δ ⁢   ⁢ t 2 ⁢ τ t , i , j n = ⁢ τ i , j n + ( 1 2 - Δ ⁢   ⁢ t 2 ⁢ J i , j ⁢ u _ i , j n ) ⁢ τ ξ , i , j n - Δ ⁢   ⁢ t 2 ⁢ J i , j ⁢ ( w _ ⁢ τ η ) i , j n - ⁢ Δ ⁢   ⁢ t 2 ⁢ ( v r ⁢ τ v ) i , j n + Δ ⁢   ⁢ t 2 ⁢ G i , j n ( 89 ) G i , j n = { τ · ( ∇ u -> ) + ( ∇ u -> ) T · τ - 1 λ ⁡ ( ϕ ) ⁢ ( τ - 2 ⁢   ⁢ μ p ⁡ ( ϕ ) Re p ⁢ D ) } i , j n ( 90 ) τ i + 1 / 2 , j n + 1 / 2 , R = ⁢ τ i + 1 , j n - 1 2 ⁢ τ ξ , i + 1 , j n + Δ ⁢   ⁢ t 2 ⁢ τ t , i + 1 , j n = ⁢ τ i + 1 , j n - ( 1 2 + Δ ⁢   ⁢ t 2 ⁢ J i + 1 , j ⁢ u _ i + 1 , j n ) ⁢ τ ξ , i + 1 , j n - Δ ⁢   ⁢ t 2 ⁢ J i + 1 , j ⁢ ( w _ ⁢   ⁢ τ η ) i + 1 , j n - ⁢ Δ ⁢   ⁢ t 2 ⁢ ( v r ⁢ τ v ) i + 1 , j n + Δ ⁢   ⁢ t 2 ⁢ G i + 1 , j n ( 91 ) τ i + 1 / 2 , j n + 1 / 2 = { τ i + 1 / 2 , j n + 1 / 2 , L if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 > 0 τ i + 1 / 2 , j n + 1 / 2 , R if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 < 0 τ i + 1 / 2 , j n + 1 / 2 , L + τ i + 1 / 2 , j n + 1 / 2 , R 2 if ⁢   ⁢ u _ i + 1 / 2 , j n + 1 / 2 = 0 ( 92 ) v i , j n + 1 / 2 r i , j ⁢ τ v , i , j n + 1 / 2 = 1 16 ⁢ r i , j ⁢ ( v i + 1 / 2 , j n + 1 / 2 + v i - 1 / 2 , j n + 1 / 2 + v i , j + 1 / 2 n + 1 / 2 + v i , j - 1 / 2 n + 1 / 2 ) ⁢ ⁢ ( τ v , i + 1 / 2 , j n + 1 / 2 + τ v , i - 1 / 2 , j n + 1 / 2 + τ v , i , j + 1 / 2 n + 1 / 2 + τ v , i , j - 1 / 2 n + 1 / 2 ) ( 93 ) [ τ · ( ∇ u -> ) ] i , j n + 1 / 2 = [ τ · ( g J ⁢ T T ⁢ ∇ Ξ ⁢ u -> + u r ⁢ I 22 - v r ⁢ I 21 ) ] i , j i + 1 / 2 ( 94 ) τ i , j n + 1 / 2 = τ i + 1 / 2 , j n + 1 / 2 + τ i - 1 / 2 , j n + 1 / 2 + τ i , j + 1 / 2 n + 1 / 2 + τ i , j - 1 / 2 n + 1 / 2 4 ( 95 ) ( g J ⁢ T T ⁢ ∇ Ξ ⁢ u -> ) i , j n + 1 / 2 = ( g J ⁢ T T ) i , j ⁢ ( u ξ v ξ w ξ 0 0 0 u η v η w η ) i , j n + 1 / 2 ( 96 ) u ξ , i , j n + 1 / 2 = u i + 1 / 2 , j n + 1 / 2 - u i - 1 / 2 , j n + 1 / 2 ⁢ u η , i , j n + 1 / 2 = u i , j + 1 / 2 n + 1 / 2 - u i , j - 1 / 2 n + 1 / 2 ( 97 ) u i , j n + 1 / 2 r i , j = u i + 1 / 2 , j n + 1 / 2 + u i - 1 / 2 , j n + 1 / 2 + u i , j + 1 / 2 n + 1 / 2 + u i , j - 1 / 2 n + 1 / 2 4 ⁢ r i , j ( 98 ) ( ∇ · τ ) i , j n + 1 / 2 = ⁢ [ 1 J ⁢ ∇ Ξ ⁢ · τ _ + 1 r ⁢ ( - τ θθ ⁢   ⁢ τ r ⁢   ⁢ θ ⁢   ⁢ 0 ) T ] i , j n + 1 / 2 = ⁢ 1 J i , j ⁡ [ ( gT ⁢   ⁢ τ ) i + 1 / 2 , j n + 1 / 2 - ( gT ⁢   ⁢ τ ) i - 1 / 2 , j n + 1 / 2 + ( gT ⁢   ⁢ τ ) i , j + 1 / 2 n + 1 / 2 - ( gT ⁢   ⁢τ ) i , j - 1 / 2 n + 1 / 2 ] ] + ⁢ 1 r i , j ⁢ ( - τ θθ , i , j n + 1 / 2 ⁢  ⁢ τ r ⁢   ⁢ θ , i , j n + 1 / 2 ⁢   ⁢ 0 ) T ( 99 ) ( gT ) i + 1 / 2 , j n + 1 / 2 = π ⁢   ⁢ r i + 1 / 2 , j ⁡ ( T i + 1 , j + T i , j ) ( 100 ) H ⁡ ( ϕ ) = { 0 if ⁢   ⁢ ϕ < - ɛ 1 2 ⁡ [ 1 + ϕ ɛ + 1 π ⁢ sin ⁡ ( π ⁢   ⁢ ϕ ɛ ) ] if ⁢   ⁢  ϕ  ≤ ɛ 1 if ⁢   ⁢ ϕ > ɛ ( 101 ) δ ⁡ ( ϕ ) = ⅆ H ⁡ ( ϕ ) ⅆ ϕ ( 102 ) ɛ = α 2 ⁢ ( Δ ⁢   ⁢ r + Δ ⁢   ⁢ z ) ( 103 ) Δ ⁢   ⁢ t < min i , j ⁢ [ Δ ⁢   ⁢ r  u  + 2 ⁢ τ rr + 2 λ ⁢   ⁢ Re , Δ ⁢   ⁢ z  w  + 2 ⁢ τ zz + 2 λ ⁢   ⁢ Re , h 3 ⁢ We ⁢   ⁢ρ 1 + ρ 2 8 ⁢ π , Re 3 ⁢ ρ μ ⁢ ( 1 Δ ⁢   ⁢ r 2 + 1 Δ ⁢   ⁢ z 2 ) - 1 , 2 ⁢ h  F ->  ] ( 104 ) 

1. A method for simulating and analyzing viscoelastic fluid flow through, and ejection from a channel, the fluid having an interface between a first fluid and a second fluid, the method comprising: (i) performing finite difference analysis and a level set projection method to solve, with reference to a rectangular gird, equations governing the viscoelastic flow of the first fluid through the channel; wherein (a) the equations governing the viscoelastic flow of the first fluid includes an azimuthal velocity term that describes an approximate description of the azimuthal flow of the first fluid; (b) the equations governing the viscoelastic flow include an approximation of the stress experienced by the first fluid being simulated; (c) the equations governing the viscoelastic flow include an advection term that includes the azimuthal velocity term; and (d) the finite difference analysis includes a second-order Godunov type upwind scheme is used to update the advection terms over time; and (ii) updating, periodically during the simulation, the level set for the first and second fluids.
 2. The method of claim 1, wherein the equations governing viscoelastic flow include a first velocity vector that that is orthogonal to a horizontal component of a fluid velocity vector that describes the velocity of the first fluid and a vertical component of the first velocity vector is substantially zero.
 3. The method of claim 2, wherein the fluid velocity vector and the first velocity vector are described with reference to an axially symmetric coordinate system, a radial component of the first velocity vector is equal to the negative of an azimuthal component of the fluid velocity vector, and an azimuthal component of the first velocity vector is equal to a radial component of the fluid velocity vector.
 4. The method of claim 1, wherein the finite difference analysis and the level set projection method are used to solve equations governing the fluid flow of both the first fluid and the second fluid.
 5. The method of claim 4, wherein the fluid flow of the second fluid is viscoelastic.
 6. A computer readable medium encoded with instructions, which computer can interpret to perform the method recited in claim
 1. 7. A system including logic elements for performing the method recited in claim
 1. 8. The method of claim 1, wherein the equations governing the viscoelastic flow include a partial differential of a stress tensor along an azimuthal axis, which is defined as $\frac{\partial\tau}{\partial\theta} = {\begin{pmatrix} {{- 2}\tau_{r\quad\theta}} & {\tau_{rr} - \tau_{\theta\theta}} & {- \tau_{\theta\quad z}} \\ {\tau_{rr} - \tau_{\theta\theta}} & {2\tau_{r\quad\theta}} & \tau_{rz} \\ {- \tau_{\theta\quad z}} & \tau_{rz} & 0 \end{pmatrix}.}$ 